package com.cxh.service.impl;

import com.cxh.base.Data2ServiceImpl;
import com.cxh.util.DataSource;
import com.cxh.dao.CarCompetitiveDetailDao;
import com.cxh.entity.CarCompetitiveDetail;
import com.cxh.service.CarCompetitiveDetailService;
import com.cxh.util.CommonUtility;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 类说明：
 * @author  ChenXH
 * @date  2018-11-20 16:40:43
 */
@Service("carCompetitiveDetailService")
@DataSource("dataSource2")
public class CarCompetitiveDetailServiceImpl extends Data2ServiceImpl<CarCompetitiveDetail> implements CarCompetitiveDetailService {
    @Autowired
    private CarCompetitiveDetailDao dao;


    @Override
    public List<CarCompetitiveDetail> loadPageList(Map<String, Object> map) {
       return dao.loadPageList(map);
    }

    @Override
    public List<CarCompetitiveDetail> getDataByCarCompetitiveId(String carCompetitiveid) {
    	return dao.getDataByCarCompetitiveId(carCompetitiveid);
    }
    
    @Override
    public void updateTwoData(CarCompetitiveDetail carCompetitiveDetailSave,CarCompetitiveDetail carCompetitiveDetailNew) {
    	dao.updateByPrimaryKey(carCompetitiveDetailSave);
    	dao.updateByPrimaryKey(carCompetitiveDetailNew);
    }

}
